package com.quectel.sys.module.sys.entity.mongo;

import com.quectel.constant.BackupConfigConstants;
import com.quectel.sys.constants.MongoCollectionConstants;
import com.quectel.util.client.mongo.MongoBaseModel;
import lombok.Data;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * @author caolu
 * @email louis.cao@quectel.com
 * @date 2022/01/17 10:34
 */
@Data
@Document(MongoCollectionConstants.SMS_CODE_SEND_RECORD)
public class SmsSendModel implements MongoBaseModel {

    private Long id;

    /**
     * 租户id
     */
    @Indexed(name = "index_tenant_id", background = true)
    private Long tenantId;

    /**
     * 发送ip记录
     */
    private String ip;

    /**
     * 手机号
     */
    private String mobile;
    /**
     * 发送标题
     */
    private String title;

    /**
     * 发送内容
     */
    private String content;

    /**
     * 备注
     */
    private String remark;

    /**
     * 发送的验证码时间
     */
    @Indexed(name = "idx_create_time", background = true, expireAfterSeconds = BackupConfigConstants.MONGO_LOG_DATA_DEFAULT_RETAIN_SECONDS)
    private Date createTime;

    /**
     * 发送状态1成功0失败
     */
    private Byte status;
}
